﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Popup.Master" AutoEventWireup="true" CodeBehind="HR_PopAddNewRotationHR.aspx.cs" Inherits="vHCS.K2App.MdlK2.StaffMovement.Ver1.HR_PopAddNewRotationHR" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="Core.Controls" Namespace="Core.Controls.DataReader" TagPrefix="core" %>
<%@ Register Src="~/MdlK2/Controls/HR_ctrEmpHeader.ascx" TagName="HR_ctrEmpHeader"
    TagPrefix="uc1" %>
<%@ Register Assembly="Core.Controls" Namespace="Core.Controls.Security" TagPrefix="security" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainToolbar" runat="server">
    <asp:HiddenField ID="hdfFormStatus" runat="server" />
    <asp:HiddenField ID="hdfWorkingRecordID" runat="server" />
    <asp:HiddenField ID="hdfEmpID" runat="server" />
    <asp:HiddenField ID="hdfEmptype" runat="server" />
    <asp:HiddenField ID="hdfuser" runat="server" />
    <asp:Button ID="btnSubmit_Top" runat="server" Text="Submit" CssClass="btnSubmit"
        ValidationGroup="Save" OnClick="btnSubmit_Top_Click" />
    <asp:Button ID="btnRefresh_Top" runat="server" Text="Làm mới" CssClass="btnRefresh"
        OnClick="btnRefresh_Top_Click" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="searchWrapper">
        <uc1:HR_ctrEmpHeader ID="ctrEmpInfo" runat="server" OnUserChanged="HR_ctrEmpHeader_OnUserChanged" />
    </div>
    <div class="controlWrapper">
        <div class="div4Column">
            <%--<div class="label">
                <asp:Label ID="Label45" runat="server" Text="Loại hình thức thay đổi"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="control">
                <telerik:RadComboBox ID="cboChangeType" DataSourceID="dtsChangType" MarkFirstMatch="true"
                    Filter="Contains" AllowCustomText="false" AutoPostBack="true" runat="server"
                    Width="100%" DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="cboChangeType_SelectedIndexChanged">
                </telerik:RadComboBox>
                <core:CoreDataSource ID="dtsChangType" runat="server" SelectMethod="GetComboItems"
                    TypeName="vHCS.LS.Business.LS_ChangeFormTypeCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="p_strPrefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="p_bAddNullItem" DefaultValue="true" DbType="Boolean" />
                        <asp:Parameter Name="p_bGetTop" DefaultValue="false" DbType="Boolean" />
                    </SelectParameters>
                </core:CoreDataSource>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="cboChangeType"
                    ErrorMessage="Loại hình thức không được để trống" CssClass="validation" Display="Dynamic"
                    SetFocusOnError="true" ValidationGroup="Save">
                </asp:RequiredFieldValidator>
            </div>--%>
            <div class="label">
                <asp:Label ID="Label46" runat="server" Text="Hình thức thay đổi"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="control">
                <telerik:RadComboBox ID="cboChangeForm" runat="server" Width="100%" DataSourceID="dtsChangeForm"
                    MarkFirstMatch="true" Filter="Contains" AllowCustomText="false" DataTextField="Name"
                    DataValueField="Id">
                </telerik:RadComboBox>
                <core:CoreDataSource ID="dtsChangeForm" runat="server" SelectMethod="GetComboItemsFollowStaffMovement"
                    TypeName="vHCS.LS.Business.LS_ChangeFormCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="p_strPrefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="p_bAddNull" DefaultValue="true" DbType="Boolean" />
                        <asp:Parameter Name="p_bGetTop" DefaultValue="false" DbType="Boolean" />
                    </SelectParameters>
                </core:CoreDataSource>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="cboChangeForm"
                    ErrorMessage="Hình thức thay đổi không được để trống" CssClass="validation" Display="Dynamic"
                    SetFocusOnError="true" ValidationGroup="Save">
                </asp:RequiredFieldValidator>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label1" runat="server" Text="Ngày hiệu lực"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="control">
                <telerik:RadDatePicker ID="dpkEffectiveDate" runat="server">
                </telerik:RadDatePicker>
                <div style="display: none">
                    <telerik:RadDatePicker ID="dpkNgayvaocty" runat="server">
                    </telerik:RadDatePicker>
                </div>

                <div class="divClear"></div>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="dpkEffectiveDate"
                    ErrorMessage="Ngày hiệu lực không được để trống" CssClass="validation" Display="Dynamic"
                    SetFocusOnError="true" ValidationGroup="Save">
                </asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidator" runat="server" ControlToValidate="dpkEffectiveDate"
                    ControlToCompare="dpkNgayvaocty" Operator="GreaterThanEqual" ErrorMessage="Ngày hiệu lực phải lớn hơn hoặc bằng ngày vào công ty"
                    CssClass="validation" Display="Dynamic" SetFocusOnError="true" ValidationGroup="Save">
                </asp:CompareValidator>
            </div>
                
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label66" runat="server" Text="Quyết định"></asp:Label>
            </div>
            <div class="control">
                <asp:RadioButtonList ID="rbtDecision" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="1" Text="Có"></asp:ListItem>
                    <asp:ListItem Value="2" Text="Không" Selected="True"></asp:ListItem>
                </asp:RadioButtonList>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label2" runat="server" Text="File đính kèm"></asp:Label>
            </div>
            <div class="control">
                <telerik:RadAsyncUpload ID="uplAttatchFile" runat="server" InitialFileInputsCount="1"
                    MaxFileInputsCount="1" MaxFileSize="4000000" AllowedFileExtensions="doc,docx,pdf,xls,xlsx,jpg,gif,jpeg,png">
                </telerik:RadAsyncUpload>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label41" runat="server" Text="9"></asp:Label>
            </div>
            <div class="controlCenter">
                <asp:Label ID="Label42" runat="server" Font-Bold="true" Text="Nơi chuyển đi"></asp:Label>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label43" runat="server" Text="9"></asp:Label>
            </div>
            <div class="controlCenter">
                <asp:Label ID="Label44" runat="server" Font-Bold="true" Text="Nơi chuyển đến"></asp:Label>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label8" runat="server" Text="Văn phòng làm việc"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="control">
                <asp:TextBox ID="txtOffice" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label9" runat="server" Text="Văn phòng làm việc"></asp:Label>
            </div>
            <div class="controlLast">
                <telerik:RadComboBox ID="cboOffice" runat="server" Width="100%" MarkFirstMatch="true"
                    AllowCustomText="false" DataSourceID="dtsOffice" DataTextField="Name" DataValueField="Id">
                </telerik:RadComboBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="cboOffice"
                    ErrorMessage="Văn phòng làm việc không được để trống" CssClass="validation" Display="Dynamic"
                    SetFocusOnError="true" ValidationGroup="Save">
                </asp:RequiredFieldValidator>
                <core:CoreDataSource ID="dtsOffice" runat="server" SelectMethod="GetComboItems" TypeName="vHCS.LS.Business.LS_WorkPlaceCollection"
                    MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="p_strPrefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="p_bAddNullItem" DefaultValue="true" DbType="Boolean" />
                        <asp:Parameter Name="p_bGetTop" DefaultValue="false" DbType="Boolean" />
                    </SelectParameters>
                </core:CoreDataSource>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label11" runat="server" Text="Cơ cấu tổ chức"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="control">
                <asp:TextBox ID="txtCocautochuc" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
                <telerik:RadToolTip ID="rttOrgChart" runat="server" TargetControlID="txtCocautochuc">
                </telerik:RadToolTip>
                <div style="display: none">
                    <asp:TextBox ID="txtOrgchartID" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
                </div>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label13" runat="server" Text="Cơ cấu tổ chức"></asp:Label>
            </div>
            <div class="controlLast">
                <telerik:RadToolTip ID="rttOrgChart_input" runat="server" TargetControlID="cboOrgChart">
                </telerik:RadToolTip>
                <telerik:RadComboBox ID="cboOrgChart" runat="server" Width="100%" Filter="Contains"
                    DropDownWidth="500px" Height="400px" OnClientDropDownOpened="treeOrgChart.OnClientDropDownOpenedHandler"
                    EmptyMessage="Chọn cây cơ cấu tổ chức" ExpandAnimation-Type="None" OnClientSelectedIndexChanged="tooltip_orgchart.SetToolTip_OrChart"
                    CollapseAnimation-Type="None" AutoPostBack="true" OnSelectedIndexChanged="cboOrgChart_SelectedIndexChanged">
                    <ItemTemplate>
                        <div class="noneItem" onclick="treeOrgChart.noneItemClick();">
                        </div>
                        <div id="divOrgChart" onclick="treeOrgChart.StopPropagation(event);">
                            <telerik:RadTreeView runat="server" ID="trvOrgChart" Width="100%" OnClientNodeClicking="treeOrgChart.nodeClicking"
                                DataFieldID="HierarchyId" DataFieldParentID="ParentId" DataSourceID="dtsOrgChart"
                                DataTextField="HierarchyName" DataValueField="HierarchyId">
                            </telerik:RadTreeView>
                        </div>
                        <div class="divButton">
                            <asp:LinkButton ID="btnCollapseAll" CssClass="treeCollapse" OnClientClick="treeExpandCollapse.treeCollapseAllNodes(); return false;"
                                runat="server">Collapse All</asp:LinkButton>
                            <asp:LinkButton ID="btnExpandAll" CssClass="treeExpand" OnClientClick="treeExpandCollapse.treeExpandAllNodes(); return false;"
                                runat="server">Expand All</asp:LinkButton>
                        </div>
                    </ItemTemplate>
                    <Items>
                        <telerik:RadComboBoxItem Text="" Value="" />
                    </Items>
                    <ExpandAnimation Type="None"></ExpandAnimation>
                    <CollapseAnimation Type="None"></CollapseAnimation>
                </telerik:RadComboBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="cboOrgChart"
                    ErrorMessage="Cơ cấu tổ chức không được để trống" CssClass="validation" Display="Dynamic"
                    SetFocusOnError="true" ValidationGroup="Save">
                </asp:RequiredFieldValidator>
                <core:CoreDataSource ID="dtsOrgChart" runat="server" SelectMethod="FindOrgChart"
                    TypeName="vHCS.HR.Business.HIE_HierarchyCollection" MaximumRowsParameterName="">
                </core:CoreDataSource>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label23" runat="server" Text="Chức vụ"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="control">
                <asp:TextBox ID="txtChucvu" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label25" runat="server" Text="Chức vụ"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="controlLast">
                <telerik:RadComboBox ID="cboJobTitle" Width="100%" Filter="Contains" AllowCustomText="false"
                    MarkFirstMatch="true" DataSourceID="dtsJobTitle" runat="server" DataTextField="Name"
                    DataValueField="Id" AutoPostBack="True" EmptyMessage="Nhập chức vụ muốn tìm"
                    OnSelectedIndexChanged="cboJobTitle_SelectedIndexChanged" OnItemsRequested="RadComboBox_ItemRequested" EnableLoadOnDemand="True" HighlightTemplatedItems="True">
                </telerik:RadComboBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="cboJobTitle"
                    ErrorMessage="Chức vụ không được để trống" CssClass="validation" Display="Dynamic"
                    SetFocusOnError="true" ValidationGroup="Save">
                </asp:RequiredFieldValidator>
                <core:CoreDataSource ID="dtsJobTitle" runat="server" SelectMethod="GetComboItems_ForWR"
                    EnableCaching="false" TypeName="vHCS.LS.Business.LS_JobTitleCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="jobLevelId" DefaultValue="0" DbType="Int64" />
                        <asp:Parameter Name="jobFamilyId" DefaultValue="0" DbType="Int64" />
                        <asp:Parameter Name="jobGroupId" DefaultValue="0" DbType="Int64" />
                        <asp:Parameter Name="subGroupId" DefaultValue="0" DbType="Int64" />
                        <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="addNullItem" DefaultValue="true" DbType="Boolean" />
                        <asp:Parameter Name="getTop" DefaultValue="true" DbType="Boolean" />
                        <asp:Parameter Name="effectivedate" DefaultValue="" DbType="DateTime" />
                    </SelectParameters>
                </core:CoreDataSource>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label14" runat="server" Text="Cơ cấu chuyên môn"></asp:Label>
                <%--<span class="labelRequiredField">(*)</span>--%>
            </div>
            <div class="control">
                <telerik:RadToolTip ID="rttProChart" runat="server" TargetControlID="txtCocauchuyenmon">
                </telerik:RadToolTip>
                <asp:TextBox ID="txtCocauchuyenmon" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label16" runat="server" Text="Cơ cấu chuyên môn"></asp:Label>
            </div>
            <div class="controlLast">
                <asp:Panel ID="pnlProChart" runat="server" ScrollBars="None">
                    <telerik:RadToolTip ID="rttProChart_input" runat="server" TargetControlID="cboProChart">
                    </telerik:RadToolTip>
                    <asp:Label ID="lblCanhBaoProChart" runat="server" Visible="false" Text="Hiện tại chưa có liên kết giữa chức vụ và cơ cấu chuyên môn. Vui lòng cập nhật ở chức năng danh mục." CssClass="validation"></asp:Label>
                    <telerik:RadComboBox ID="cboProChart" runat="server" Width="50%" Height="400px" DropDownWidth="500px"
                        OnClientDropDownOpened="treeProChart.OnClientDropDownOpenedHandler" EmptyMessage="Chọn cơ cấu chuyên môn"
                        ExpandAnimation-Type="None" OnClientSelectedIndexChanged="tooltip_prochart.SetToolTip_OrChart"
                        CollapseAnimation-Type="None" OnSelectedIndexChanged="cboProChart_SelectedIndexChanged">
                        <ItemTemplate>
                            <div class="noneItem" onclick="treeProChart.noneItemClick();">
                            </div>
                            <div class="divTreeOnRadCombo" id="divProChart" onclick="treeProChart.StopPropagation(event);">
                                <telerik:RadTreeView runat="server" ID="trvProChart" Width="100%" DataFieldID="HierarchyId"
                                    DataFieldParentID="ParentId" DataSourceID="dtsProChart" DataTextField="HierarchyName"
                                    DataValueField="HierarchyId" OnClientNodeClicking="treeProChart.nodeClicking">
                                </telerik:RadTreeView>
                            </div>
                            <div class="divButton">
                                <asp:LinkButton ID="btnCollapseAll" CssClass="treeCollapse" OnClientClick="treeProJobChart.treeCollapseAllNodes(); return false;"
                                    runat="server">Collapse All</asp:LinkButton>
                                <asp:LinkButton ID="btnExpandAll" CssClass="treeExpand" OnClientClick="treeProJobChart.treeExpandAllNodes(); return false;"
                                    runat="server">Expand All</asp:LinkButton>
                            </div>
                        </ItemTemplate>
                        <Items>
                            <telerik:RadComboBoxItem Text="" Value="" meta:resourcekey="RadComboBoxItemResource2" />
                        </Items>
                        <ExpandAnimation Type="None"></ExpandAnimation>
                        <CollapseAnimation Type="None"></CollapseAnimation>
                    </telerik:RadComboBox>
                    <core:CoreDataSource ID="dtsProChart" runat="server" SelectMethod="FindProChart_ByJobtitle"
                        TypeName="vHCS.HR.Business.HIE_HierarchyCollection" MaximumRowsParameterName="">
                        <SelectParameters>
                            <asp:ControlParameter Name="Jobtitle" ControlID="cboJobTitle" PropertyName="SelectedValue"
                                DbType="Int64" />
                            <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                            <asp:Parameter Name="effectivedate" DefaultValue="" DbType="DateTime" />
                        </SelectParameters>
                    </core:CoreDataSource>
                    <%-- Load thong tin ProRanking --%>
                    <telerik:RadComboBox ID="cboProRanking" runat="server" Width="25%" DataSourceID="dtsProRanking"
                        DataTextField="Name" DataValueField="ID" AutoPostBack="true">
                    </telerik:RadComboBox>
                    <core:CoreDataSource ID="dtsProRanking" runat="server" SelectMethod="GetComboItems_EffectiveDate"
                        TypeName="vHCS.LS.Business.LS_RankingLevelCollection" MaximumRowsParameterName="">
                        <SelectParameters>
                            <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                            <asp:Parameter Name="addNullItem" DefaultValue="true" DbType="Boolean" />
                            <asp:Parameter Name="getTop" DefaultValue="false" DbType="Boolean" />
                            <asp:Parameter Name="effectivedate" DefaultValue="" DbType="DateTime" />
                        </SelectParameters>
                    </core:CoreDataSource>
                    <%-- Load thong tin ProGrade --%>
                    <telerik:RadComboBox ID="cboProGrade" runat="server" Width="23%" DataSourceID="dtsProGrade"
                        DataTextField="Name" DataValueField="ID">
                    </telerik:RadComboBox>
                    <core:CoreDataSource ID="dtsProGrade" runat="server" SelectMethod="GetComboItems_Effectivedate"
                        TypeName="vHCS.LS.Business.LS_GradeCollection" MaximumRowsParameterName="">
                        <SelectParameters>
                            <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                            <asp:Parameter Name="addNullItem" DefaultValue="true" Type="Boolean" />
                            <asp:Parameter Name="getTop" DefaultValue="false" Type="Boolean" />
                            <asp:Parameter Name="effectivedate" DefaultValue="" DbType="DateTime" />
                            <asp:ControlParameter Name="rankingid" ControlID="cboProRanking" PropertyName="SelectedValue"
                                DbType="Int64" />
                        </SelectParameters>
                    </core:CoreDataSource>
                    <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="cboProChart"
                        ErrorMessage="Cơ cấu chuyên môn không được để trống" CssClass="validation" Display="Dynamic"
                        SetFocusOnError="true" ValidationGroup="Save">
                    </asp:RequiredFieldValidator>--%>
                </asp:Panel>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label17" runat="server" Text="Cơ cấu quản lý"></asp:Label>
            </div>
            <div class="control">
                <telerik:RadToolTip ID="rttMgtChart" runat="server" TargetControlID="txtCocauquanly">
                </telerik:RadToolTip>
                <asp:TextBox ID="txtCocauquanly" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label19" runat="server" Text="Cơ cấu quản lý"></asp:Label>
            </div>
            <div class="controlLast">
                <asp:Panel ID="pnlMgtChart" runat="server">
                <telerik:RadToolTip ID="rttMgtChart_input" runat="server" TargetControlID="cboMgtChart">
                </telerik:RadToolTip>
                <telerik:RadComboBox ID="cboMgtChart" runat="server" Width="50%" Height="400px" DropDownWidth="500px"
                    OnClientDropDownOpened="treeMgtChart.OnClientDropDownOpenedHandler" EmptyMessage="Chọn cơ cấu quản lý"
                    ExpandAnimation-Type="None" OnClientSelectedIndexChanged="tooltip_mgtchart.SetToolTip_OrChart"
                    CollapseAnimation-Type="None" OnSelectedIndexChanged="cboMgtChart_SelectedIndexChanged">
                    <ItemTemplate>
                        <div class="noneItem" onclick="treeMgtChart.noneItemClick();">
                        </div>
                        <div class="divTreeOnRadCombo" id="divMgtChart" onclick="treeMgtChart.StopPropagation(event);">
                            <telerik:RadTreeView runat="server" ID="trvMgtChart" Width="100%" DataFieldID="HierarchyId"
                                DataFieldParentID="ParentId" DataSourceID="dtsMgtChart" DataTextField="HierarchyName"
                                DataValueField="HierarchyId" OnClientNodeClicking="treeMgtChart.nodeClicking">
                            </telerik:RadTreeView>
                        </div>
                        <div class="divButton">
                            <asp:LinkButton ID="btnCollapseAll" CssClass="treeCollapse" OnClientClick="treeMgtJobChart.treeCollapseAllNodes(); return false;"
                                runat="server" meta:resourcekey="btnCollapseAllResource3">Collapse All</asp:LinkButton>
                            <asp:LinkButton ID="btnExpandAll" CssClass="treeExpand" OnClientClick="treeMgtJobChart.treeExpandAllNodes(); return false;"
                                runat="server" meta:resourcekey="btnExpandAllResource3">Expand All</asp:LinkButton>
                        </div>
                    </ItemTemplate>
                    <Items>
                        <telerik:RadComboBoxItem Text="" Value="" meta:resourcekey="RadComboBoxItemResource3" />
                    </Items>
                    <ExpandAnimation Type="None"></ExpandAnimation>
                    <CollapseAnimation Type="None"></CollapseAnimation>
                </telerik:RadComboBox>
                <core:CoreDataSource ID="dtsMgtChart" runat="server" SelectMethod="FindMgtChart_ByJobtitle"
                    TypeName="vHCS.HR.Business.HIE_HierarchyCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:ControlParameter Name="Jobtitle" ControlID="cboJobTitle" PropertyName="SelectedValue"
                            DbType="Int64" />
                        <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="effectivedate" DefaultValue="" DbType="DateTime" />
                    </SelectParameters>
                </core:CoreDataSource>
                <telerik:RadComboBox ID="cboMgtRaking" runat="server" Width="25%" DataSourceID="dtsMgtRanking"
                    DataTextField="Name" DataValueField="ID" AutoPostBack="true">
                </telerik:RadComboBox>
                <core:CoreDataSource ID="dtsMgtRanking" runat="server" SelectMethod="GetComboItems_EffectiveDate"
                    TypeName="vHCS.LS.Business.LS_RankingLevelCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="addNullItem" DefaultValue="true" DbType="Boolean" />
                        <asp:Parameter Name="getTop" DefaultValue="false" DbType="Boolean" />
                        <asp:Parameter Name="effectivedate" DefaultValue="" DbType="DateTime" />
                    </SelectParameters>
                </core:CoreDataSource>
                <telerik:RadComboBox ID="cboMgtGrade" runat="server" Width="23%" DataSourceID="dtsMgtGrade"
                    DataValueField="ID" DataTextField="Name">
                </telerik:RadComboBox>
                <core:CoreDataSource ID="dtsMgtGrade" runat="server" SelectMethod="GetComboItems_Effectivedate"
                    TypeName="vHCS.LS.Business.LS_GradeCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="addNullItem" DefaultValue="true" Type="Boolean" />
                        <asp:Parameter Name="getTop" DefaultValue="false" Type="Boolean" />
                        <asp:Parameter Name="effectivedate" DefaultValue="" DbType="DateTime" />
                        <asp:ControlParameter Name="rankingid" ControlID="cboMgtRaking" PropertyName="SelectedValue"
                                DbType="Int64" />
                    </SelectParameters>
                </core:CoreDataSource>
                </asp:Panel>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label20" runat="server" Text="Cấp bậc"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="control">
                <asp:TextBox ID="txtCapbac" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label22" runat="server" Text="Cấp bậc"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="controlLast">
                <telerik:RadComboBox ID="cboJobLevel" Width="100%" runat="server" Filter="Contains"
                    MarkFirstMatch="True" AllowCustomText="false" DataSourceID="dtsJobLevel" DataTextField="Name"
                    DataValueField="Id" OnSelectedIndexChanged="cboJobLevel_SelectedIndexChanged"
                    meta:resourcekey="cboJobLevelResource1" AutoPostBack="True">
                </telerik:RadComboBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="cboJobLevel"
                    ErrorMessage="Cấp bậc không được để trống" CssClass="validation" Display="Dynamic"
                    SetFocusOnError="true" ValidationGroup="Save">
                </asp:RequiredFieldValidator>
                <core:CoreDataSource ID="dtsJobLevel" runat="server" SelectMethod="GetComboItems_ByJotitle"
                    TypeName="vHCS.LS.Business.LS_JobLevelCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="p_strPrefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="p_bAddNullItem" DefaultValue="true" DbType="Boolean" />
                        <asp:Parameter Name="p_bGetTop" DefaultValue="false" DbType="Boolean" />
                        <asp:Parameter Name="jobtitle" DefaultValue="0" DbType="Int64" />
                        <asp:Parameter Name="effectivedate" DefaultValue="" DbType="DateTime" />
                    </SelectParameters>
                </core:CoreDataSource>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label4" runat="server" Text="Job role"></asp:Label>
                <%--<span class="labelRequiredField">(*)</span>--%>
            </div>
            <div class="control">
                <telerik:RadToolTip ID="rttJobRole" runat="server" TargetControlID="txtJobrole">
                </telerik:RadToolTip>
                <asp:TextBox ID="txtJobrole" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
                <div style="display: none">
                    <asp:TextBox ID="txtJobroleID" runat="server"></asp:TextBox>
                </div>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label6" runat="server" Text="Jop role"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="controlLast">
                <telerik:RadToolTip ID="rttJobRole_input" runat="server" TargetControlID="cboJobRole">
                </telerik:RadToolTip>
                <telerik:RadComboBox ID="cboJobRole" Width="100%" DataTextField="Name" DataValueField="Id"
                    DataSourceID="dtsJobRole" AllowCustomText="true" HighlightTemplatedItems="true"
                    Filter="Contains" OnClientSelectedIndexChanging="chkJobRole.OnClientSelectedIndexChanging"
                    OnClientLoad="chkJobRole.OnClientLoad" OnClientDropDownClosing="chkJobRole.OnClientDropDownClosing"
                    OnClientBlur="chkJobRole.OnClientBlur" OnClientTextChange="tooltip_jobrole.SetToolTip_OrChart"
                    runat="server">
                    <ItemTemplate>
                        <div style="width: 100%" onclick="chkJobRole.OnClick(this,event);">
                            <asp:CheckBox runat="server" ID="chkJobRole" onclick="chkJobRole.OnClick(this,event);"
                                Text="" />
                            <%# DataBinder.Eval(Container, "Text") %>
                        </div>
                    </ItemTemplate>
                    <FooterTemplate>
                        <div class="divButton">
                            <asp:LinkButton ID="btnSelectAll" OnClientClick="chkJobRole.SelectAll();return false;"
                                CssClass="selectAll" runat="server">Chọn tất cả</asp:LinkButton>
                            <asp:LinkButton ID="btnUnSelectAll" OnClientClick="chkJobRole.DeselectAll();return false;"
                                CssClass="deselectAll" runat="server">Bỏ chọn</asp:LinkButton>
                        </div>
                    </FooterTemplate>
                </telerik:RadComboBox>
                <core:CoreDataSource ID="dtsJobRole" runat="server" SelectMethod="GetComboItems"
                    TypeName="vHCS.LS.Business.LS_JobRoleCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="addNullItem" DefaultValue="false" DbType="Boolean" />
                        <asp:Parameter Name="getTop" DefaultValue="false" DbType="Boolean" />
                    </SelectParameters>
                </core:CoreDataSource>
                <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="cboJobRole"
                    ErrorMessage="Job role không được để trống" CssClass="validation" Display="Dynamic"
                    SetFocusOnError="true" ValidationGroup="Save">
                </asp:RequiredFieldValidator>--%>
                <div style="display: none">
                    <asp:TextBox ID="hdfJobRoles" Text="" runat="server"></asp:TextBox>
                </div>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label26" runat="server" Text="Loại nhân viên"></asp:Label>
            </div>
            <div class="control">
                <asp:TextBox ID="txtLoainhanvien" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label28" runat="server" Text="Loại nhân viên"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="controlLast">
                <asp:TextBox ID="txtLoainhanvien_Now" runat="server" Enabled="false" Width="99%"
                    ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="hr">
            <hr />
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label32" runat="server" Text="Leader (theo cơ cấu)"></asp:Label>
            </div>
            <div class="control">
                <asp:TextBox ID="txtLeader" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label34" runat="server" Text="9"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="controlLast">
                <asp:TextBox ID="txtLeader_Now" runat="server" CssClass="inputText" Width="99%" Enabled="false"></asp:TextBox>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label29" runat="server" Text="Người báo cáo"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="control">
                <asp:TextBox ID="txtNguoibaocao" runat="server" Text="" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label31" runat="server" Text="9"></asp:Label>
                <span class="labelRequiredField">(*)</span>
            </div>
            <div class="controlLast">
                <telerik:RadComboBox ID="cboReportTo" Width="100%" MarkFirstMatch="true" HighlightTemplatedItems="True"
                    DropDownWidth="500px" EnableLoadOnDemand="True" OnItemsRequested="RadComboBox_ItemRequested"
                    runat="server" DataSourceID="dtsReportTo" AllowCustomText="false" DataTextField="Name"
                    DataValueField="Id">
                    <HeaderTemplate>
                        <ul class="comboHeader">
                            <li class="code">
                                <asp:Label ID="Label2" runat="server" Text="Mã"></asp:Label>
                            </li>
                            <li class="name">
                                <asp:Label ID="Label3" runat="server" Text="Tên"></asp:Label>
                            </li>
                            <li class="divClear"></li>
                        </ul>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <ul class="comboItem">
                            <li class="code">
                                <%#DataBinder.Eval(Container.DataItem, "Code")%></li>
                            <li class="name">
                                <%#DataBinder.Eval(Container.DataItem, "Name")%></li>
                        </ul>
                    </ItemTemplate>
                    <FooterTemplate>
                        <div class="comboFooter">
                            <asp:Label ID="Label4" runat="server" Text="Please enter text to show more items"></asp:Label>
                        </div>
                    </FooterTemplate>
                </telerik:RadComboBox>
                <core:CoreDataSource ID="dtsReportTo" runat="server" SelectMethod="GetComboItems"
                    TypeName="vHCS.SYS.Business.SYS_UsersCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="addNullItem" DefaultValue="true" Type="Boolean" />
                        <asp:Parameter Name="getTop" DefaultValue="true" Type="Boolean" />
                    </SelectParameters>
                </core:CoreDataSource>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="cboReportTo"
                    ErrorMessage="Người báo cáo không được để trống" CssClass="validation" Display="Dynamic"
                    SetFocusOnError="true" ValidationGroup="Save">
                </asp:RequiredFieldValidator>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label35" runat="server" Text="Người phê duyệt"></asp:Label>
            </div>
            <div class="control">
                <asp:TextBox ID="txtNguoipheduyet" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label37" runat="server" Text="9"></asp:Label>
            </div>
            <div class="controlLast">
                <telerik:RadComboBox ID="cboNguoipheduyet_Now" Width="100%" MarkFirstMatch="true"
                    HighlightTemplatedItems="True" DropDownWidth="500px" EnableLoadOnDemand="True"
                    OnItemsRequested="RadComboBox_ItemRequested" runat="server" DataSourceID="dtsReportTo"
                    AllowCustomText="false" DataTextField="Name" DataValueField="Id">
                    <HeaderTemplate>
                        <ul class="comboHeader">
                            <li class="code">
                                <asp:Label ID="Label2" runat="server" Text="Mã"></asp:Label>
                            </li>
                            <li class="name">
                                <asp:Label ID="Label3" runat="server" Text="Tên"></asp:Label>
                            </li>
                            <li class="divClear"></li>
                        </ul>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <ul class="comboItem">
                            <li class="code">
                                <%#DataBinder.Eval(Container.DataItem, "Code")%></li>
                            <li class="name">
                                <%#DataBinder.Eval(Container.DataItem, "Name")%></li>
                        </ul>
                    </ItemTemplate>
                    <FooterTemplate>
                        <div class="comboFooter">
                            <asp:Label ID="Label4" runat="server" Text="Please enter text to show more items"></asp:Label>
                        </div>
                    </FooterTemplate>
                </telerik:RadComboBox>
                <core:CoreDataSource ID="dtsNguoiPheDuyet" runat="server" SelectMethod="GetComboItems"
                    TypeName="vHCS.SYS.Business.SYS_UsersCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="addNullItem" DefaultValue="true" Type="Boolean" />
                        <asp:Parameter Name="getTop" DefaultValue="true" Type="Boolean" />
                    </SelectParameters>
                </core:CoreDataSource>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label38" runat="server" Text="Người mentor"></asp:Label>
            </div>
            <div class="control">
                <asp:TextBox ID="txtNguoimentor" runat="server" ReadOnly="true" CssClass="inputReadOnlyBold"></asp:TextBox>
            </div>
            <div class="label" style="visibility: hidden;">
                <asp:Label ID="Label40" runat="server" Text="9"></asp:Label>
            </div>
            <div class="controlLast">
                <telerik:RadComboBox ID="cboNguoimentor_Now" Width="100%" MarkFirstMatch="true" HighlightTemplatedItems="True"
                    DropDownWidth="500px" EnableLoadOnDemand="True" OnItemsRequested="RadComboBox_ItemRequested"
                    runat="server" DataSourceID="dtsReportTo" AllowCustomText="false" DataTextField="Name"
                    DataValueField="Id">
                    <HeaderTemplate>
                        <ul class="comboHeader">
                            <li class="code">
                                <asp:Label ID="Label2" runat="server" Text="Mã"></asp:Label>
                            </li>
                            <li class="name">
                                <asp:Label ID="Label3" runat="server" Text="Tên"></asp:Label>
                            </li>
                            <li class="divClear"></li>
                        </ul>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <ul class="comboItem">
                            <li class="code">
                                <%#DataBinder.Eval(Container.DataItem, "Code")%></li>
                            <li class="name">
                                <%#DataBinder.Eval(Container.DataItem, "Name")%></li>
                        </ul>
                    </ItemTemplate>
                    <FooterTemplate>
                        <div class="comboFooter">
                            <asp:Label ID="Label4" runat="server" Text="Please enter text to show more items"></asp:Label>
                        </div>
                    </FooterTemplate>
                </telerik:RadComboBox>
                <core:CoreDataSource ID="dtsNguoiMentor" runat="server" SelectMethod="GetComboItems"
                    TypeName="vHCS.SYS.Business.SYS_UsersCollection" MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />
                        <asp:Parameter Name="addNullItem" DefaultValue="true" Type="Boolean" />
                        <asp:Parameter Name="getTop" DefaultValue="true" Type="Boolean" />
                    </SelectParameters>
                </core:CoreDataSource>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label7" runat="server" Text="Ghi chú"></asp:Label>
            </div>
            <div class="merge3">
                <asp:TextBox ID="txtGhichu" runat="server" TextMode="MultiLine" Height="40px" Width="98%"
                    CssClass="inputMultiText"></asp:TextBox>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="hr">
            <hr />
        </div>
        <div class="div4Column">
            <div class="contact" style="margin-left: 60px;">
                <asp:Label ID="Label48" runat="server" Font-Bold="true" Text="Xác nhận hỗ trợ IT"></asp:Label>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label">
                <asp:Label ID="Label47" runat="server" Text="Duy trì quyền hạn"></asp:Label>
            </div>
            <div class="control">
                <asp:RadioButtonList ID="rbtDuytriquyenhan" runat="server" RepeatDirection="Horizontal" Enabled="false">
                    <asp:ListItem Value="1" Text="Có" Selected="True"></asp:ListItem>
                    <asp:ListItem Value="2" Text="Không"></asp:ListItem>
                </asp:RadioButtonList>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="div4Column">
            <div class="label" style="visibility: hidden">
            </div>
            <div style="width: auto !important">
                <asp:Label ID="Label49" runat="server" Font-Bold="true" Font-Underline="true" Text="Lưu ý:"></asp:Label>
                <asp:Label ID="Label5" runat="server" Text=" Khi chọn duy trì quyền hạn của phòng ban cũ có nghĩa là mailing list của phòng ban cũ vẫn được giữ lại"></asp:Label>
            </div>
            <div class="divClear">
            </div>
        </div>
        <div class="hr">
            <hr />
        </div>
        <div class="div4Column">
            <div style="margin-left: 5px">
                <asp:CheckBox Text="Có thay đổi lương hay không?" TextAlign="Left" Font-Bold="true"
                    ID="chkChangeSalary" runat="server" onclick="ChangeSalary()" />
            </div>
        </div>
        <div id="divLuong" style="display: none">
            <div class="div4Column">
                <div class="label">
                    <asp:Label ID="Label53" runat="server" Text="Lương tổng hợp"></asp:Label>
                </div>
                <div class="divAutoNotMargin">
                    <telerik:RadNumericTextBox ID="txtGross" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number" Width="150" Enabled="false" CssClass="inputReadOnlyBold">
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>
                </div>
                <div class="control" style="margin-left: 5px;">
                    <telerik:RadNumericTextBox ID="txtGross_Now" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number" CssClass="inputText"
                        MaxLength="12" Width="150">
                        <ClientEvents OnValueChanged="Cal_Salary" />
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>
                    <div class="divClear">
                    </div>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtGross_Now" Operator="GreaterThanEqual" Type="Double"
                        ErrorMessage="Vui lòng nhập số >= 0" CssClass="validation" Display="Dynamic" ValueToCompare="0"
                        SetFocusOnError="true" ValidationGroup="Save">
                    </asp:CompareValidator>
                </div>
                <div class="divClear">
                </div>
            </div>
            <div class="div4Column">
                <div class="label">
                    <asp:Label ID="Label56" runat="server" Text="Lương căn bản"></asp:Label>
                </div>
                <div class="divAutoNotMargin">
                    <telerik:RadNumericTextBox ID="txtLuongcanban" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number" Width="150" Enabled="false" CssClass="inputReadOnlyBold">
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>
                </div>
                <div class="control" style="margin-left: 5px;">
                    <telerik:RadNumericTextBox ID="txtLuongcanban_Now" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number" MaxLength="12" CssClass="inputText"
                        Width="150">
                        <ClientEvents OnValueChanged="Cal_SalarySusidies" />
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>

                    <div class="divClear">
                    </div>
                    <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txtLuongcanban_Now" Operator="GreaterThanEqual" Type="Double"
                        ErrorMessage="Vui lòng nhập số >= 0" CssClass="validation" Display="Dynamic" ValueToCompare="0"
                        SetFocusOnError="true" ValidationGroup="Save">
                    </asp:CompareValidator>
                    <asp:CustomValidator ID="CustomValidator13" CssClass="validation" runat="server"
                        ErrorMessage="Vui lòng nhập lương cơ bản >= 65% tổng lương và <= tổng lương." Display="Dynamic" 
                        ControlToValidate="txtLuongcanban_Now" ValidationGroup="btnSave"
                        ClientValidationFunction="txtLuongCB_CheckInput" >
                    </asp:CustomValidator> 
                </div>
                <div class="divClear">
                </div>
            </div>
            <div class="div4Column">
                <div class="label">
                    <asp:Label ID="Label59" runat="server" Text="KPI"></asp:Label>
                </div>
                <div class="divAutoNotMargin">
                    <telerik:RadNumericTextBox ID="txtKPI" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number" Width="150" Enabled="false" CssClass="inputReadOnlyBold">
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>
                </div>
                <div class="control" style="margin-left: 5px;">
                    <telerik:RadNumericTextBox ID="txtKPI_Now" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number"  MaxLength="12" CssClass="inputText"
                        Width="150">
                        <ClientEvents OnValueChanged="Cal_SalarySusidies" />
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>

                    <div class="divClear">
                    </div>
                    <asp:CompareValidator ID="CompareValidator3" runat="server" ControlToValidate="txtKPI_Now" Operator="GreaterThanEqual" Type="Double"
                        ErrorMessage="Vui lòng nhập số >= 0" CssClass="validation" Display="Dynamic" ValueToCompare="0"
                        SetFocusOnError="true" ValidationGroup="Save">
                    </asp:CompareValidator>
                    <asp:CustomValidator ID="CustomValidator6" CssClass="validation" runat="server"
                        ErrorMessage="Vui lòng nhập lương KPI >= 0 và <= tổng lương." Display="Dynamic" 
                        ControlToValidate="txtKPI_Now" ValidationGroup="btnSave"
                        ClientValidationFunction="txtKPI_OnChecker" >
                    </asp:CustomValidator> 
                </div>
                <div class="divClear">
                </div>
            </div>
            <div class="div4Column">
                <div class="label">
                    <asp:Label ID="Label62" runat="server" Text="Trợ cấp tổng hợp"></asp:Label>
                </div>
                <div class="divAutoNotMargin">
                    <telerik:RadNumericTextBox ID="txtTrocaptonghop" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number" Width="150" Enabled="false" CssClass="inputReadOnlyBold">
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>
                </div>
                <div class="control" style="margin-left: 5px;">
                    <telerik:RadNumericTextBox ID="txtTrocaptonghop_Now" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number" MaxLength="12" CssClass="inputText"
                        Width="150">
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>

                    <div class="divClear">
                    </div>
                    <asp:CompareValidator ID="CompareValidator4" runat="server" ControlToValidate="txtTrocaptonghop_Now" Operator="GreaterThanEqual" Type="Double"
                        ErrorMessage="Vui lòng nhập số >= 0" CssClass="validation" Display="Dynamic" ValueToCompare="0"
                        SetFocusOnError="true" ValidationGroup="Save">
                    </asp:CompareValidator>
                    <asp:CustomValidator ID="CustomValidator12" CssClass="validation" runat="server"
                        ErrorMessage="Vui lòng nhập trợ cấp tổng hợp >= 0 và <= tổng lương." Display="Dynamic" 
                        ControlToValidate="txtTrocaptonghop_Now" ValidationGroup="btnSave"
                        ClientValidationFunction="txtTroCapTH_OnChecker" >
                    </asp:CustomValidator>
                </div>
                <div class="divClear">
                </div>
            </div>

            <div class="div4Column">
                <div class="label">
                    <asp:Label ID="Label10" runat="server" Text="Lương CTV"></asp:Label>
                </div>
                <div class="divAutoNotMargin">
                    <telerik:RadNumericTextBox ID="txtLuongCTV" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number" Width="150" Enabled="false" CssClass="inputReadOnlyBold">
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>
                </div>
                <div class="control" style="margin-left: 5px;">
                    <telerik:RadNumericTextBox ID="txtLuongCTV_Now" runat="server" NumberFormat-DecimalDigits="0"
                        NumberFormat-GroupSeparator="," Type="Number" MaxLength="12" CssClass="inputText"
                        Width="150">
                        <EnabledStyle HorizontalAlign="Right" />
                    </telerik:RadNumericTextBox>

                    <div class="divClear">
                    </div>
                    <asp:CompareValidator ID="CompareValidator5" runat="server" ControlToValidate="txtLuongCTV_Now" Operator="GreaterThanEqual" Type="Double"
                        ErrorMessage="Vui lòng nhập số >= 0" CssClass="validation" Display="Dynamic" ValueToCompare="0"
                        SetFocusOnError="true" ValidationGroup="Save">
                    </asp:CompareValidator>
                </div>
                <div class="divClear">
                </div>
            </div>

            <div class="div4Column">
                <asp:Label ID="Label3" Font-Bold="true" runat="server" Text="Trợ cấp khác"></asp:Label>
                <div class="divClear">
                </div>
            </div>
            <div class="div4Column">
                <telerik:RadGrid ID="dtgTroCap" runat="server" DataSourceID="dtsTrocap" Style="border: none !important;"
                    AutoGenerateColumns="False" AllowPaging="True" AllowMultiRowSelection="True"
                    GridLines="None" Width="100%" onitemdatabound="dtgTroCap_ItemDataBound">
                    <MasterTableView>
                        <Columns>
                            <telerik:GridTemplateColumn HeaderText="STT" ItemStyle-HorizontalAlign="Center" AllowFiltering="false"
                                meta:resourcekey="GridTemplateColumnResource1">
                                <ItemTemplate>
                                    <%# Container.ItemIndex + 1 + dtgTroCap.PageSize * dtgTroCap.CurrentPageIndex%>
                                </ItemTemplate>
                                <HeaderStyle Width="30px"></HeaderStyle>
                            </telerik:GridTemplateColumn>
                            <%--<telerik:GridBoundColumn DataField="Name" HeaderText="Tên" HeaderStyle-Width="140px"
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" />--%>
                            <telerik:GridBoundColumn DataField="Name" HeaderText="Tên"
                                HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left"
                                DataType="System.String"/>
                            <telerik:GridBoundColumn DataField="Amount" HeaderText="Số tiền" HeaderStyle-Width="80px"
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="right" DataType="System.Double"
                                DataFormatString="{0:###,###}" />
                            <telerik:GridBoundColumn DataField="AllowanceOld" HeaderText="Số tiền đưa vào PR(Nơi chuyển đi)"
                                HeaderStyle-Width="130px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="right"
                                DataType="System.Double" DataFormatString="{0:###,###}" />
                            <telerik:GridBoundColumn DataField="ToMonth" HeaderText="Hiệu lực đến tháng"
                                HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                DataType="System.String"/>
                            <telerik:GridTemplateColumn UniqueName="Amount" HeaderStyle-Width="220px" AllowFiltering="false"
                                HeaderText="Số tiền đưa vào PR(Nơi chuyển đến)" HeaderStyle-HorizontalAlign="Center"
                                ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <telerik:RadNumericTextBox ID="txtAmount" runat="server" NumberFormat-DecimalDigits="0"
                                        NumberFormat-GroupSeparator="," MaxLength="12" MinValue="0" CssClass="inputText"
                                        Width="95%" Value='<%#Convert.ToDouble(DataBinder.Eval(Container.DataItem, "AllowanceOld").ToString().Replace(",",""))%>'>
                                        <EnabledStyle HorizontalAlign="Right" />
                                    </telerik:RadNumericTextBox>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="LSAllowanceID" HeaderText="Tên" HeaderStyle-Width="140px"
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" Visible="false" />
                        </Columns>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" PageButtonCount="5" HorizontalAlign="Left"
                            Position="Bottom" />
                    </MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true">
                        <Selecting AllowRowSelect="True" />
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" FrozenColumnsCount="1">
                        </Scrolling>
                    </ClientSettings>
                </telerik:RadGrid>
                <core:CoreDataSource ID="dtsTrocap" runat="server" SelectMethod="SelectAllowance"
                    TypeName="vHCS.HR.Business.HR_WorkingRecordCollection" EnableCaching="False"
                    MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="workingrecordid" DefaultValue="" DbType="Int64" />
                    </SelectParameters>
                </core:CoreDataSource>
                <%--Load data cho combo--%>
                <core:CoreDataSource ID="dtsComboTrocap" runat="server" SelectMethod="SelectAllowance"
                    TypeName="vHCS.HR.Business.HR_WorkingRecordCollection" EnableCaching="False"
                    MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="workingrecordid" DefaultValue="0" DbType="Int64" />
                    </SelectParameters>
                </core:CoreDataSource>
            </div>
        </div>
    </div>
    <div class="formTitle">
        <div class="formToolbar">
            <asp:Button ID="btnSubmit_Bot" runat="server" Text="Submit" CssClass="btnSubmit"
                ValidationGroup="Save" OnClick="btnSubmit_Top_Click" />
            <asp:Button ID="btnRefresh_Bot" runat="server" Text="Làm mới" CssClass="btnRefresh"
                OnClick="btnRefresh_Top_Click" />
        </div>
    </div>
    <telerik:RadAjaxManager ID="ajaxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="cboChangeType">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cboChangeForm" LoadingPanelID="ajaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cboOrgChart">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="txtLeader_Now" LoadingPanelID="ajaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <%-- <telerik:AjaxSetting AjaxControlID="cboJobTitle">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl  ControlID="cboProChart"/>
                 </UpdatedControls>
             </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="cboJobTitle">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl  ControlID="cboMgtChart"/>
                 </UpdatedControls>
             </telerik:AjaxSetting>--%>
            <telerik:AjaxSetting AjaxControlID="cboJobTitle">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cboJobLevel" LoadingPanelID="ajaxLoadingPanel" />
                    <telerik:AjaxUpdatedControl ControlID="pnlProChart" LoadingPanelID="ajaxLoadingPanel" />
                    <telerik:AjaxUpdatedControl ControlID="pnlMgtChart" LoadingPanelID="ajaxLoadingPanel" />
                    <telerik:AjaxUpdatedControl ControlID="txtLoainhanvien_Now" LoadingPanelID="ajaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="dpkEffectiveDate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cboJobLevel" LoadingPanelID="ajaxLoadingPanel" />
                    <telerik:AjaxUpdatedControl ControlID="pnlProChart" LoadingPanelID="ajaxLoadingPanel" />
                    <telerik:AjaxUpdatedControl ControlID="pnlMgtChart" LoadingPanelID="ajaxLoadingPanel" />
                    <telerik:AjaxUpdatedControl ControlID="cboJobTitle" LoadingPanelID="ajaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cboJobLevel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="txtLoainhanvien_Now" LoadingPanelID="ajaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="cboProRanking">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlProChart" LoadingPanelID="ajaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cboMgtRaking">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlMgtChart" LoadingPanelID="ajaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="ajaxLoadingPanel" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <%-- Script Gọi Popup Thêm Mới Thông Tin Tài Khoản --%>
    <telerik:RadCodeBlock ID="radCodeBlock" runat="server">
        <script type="text/javascript">

            var treeOrgChart = new TreeViewInRadCombo("<%=cboOrgChart.ClientID %>", "trvOrgChart");
            var treeMgtChart = new TreeViewInRadCombo("<%=cboMgtChart.ClientID %>", "trvMgtChart");
            var treeProChart = new TreeViewInRadCombo("<%=cboProChart.ClientID %>", "trvProChart");
            var chkJobRole = new CheckBoxInRadCombo("<%=cboJobRole.ClientID %>", "<%=hdfJobRoles.ClientID %>");

            var treeExpandCollapse = new TreeExpandCollapse("<%=trvOrgChartClientId%>");
            var treeProJobChart = new TreeExpandCollapse("<%=trvProChartClientId %>");
            var treeMgtJobChart = new TreeExpandCollapse("<%=trvMgtChartClientId %>");

            var popupManger = new FormPopupManager();
            function FormPopupManager() {
                this.OpenAddNewSubsidization = function () {
                    var oWnd = radopen("../MdlHR/HR_PopAddNewRotationHR_AddNewSubsidization.aspx?IsPopup=1", null);
                    oWnd.setActive(true);
                    oWnd.maximize();
                }
            }


            function ChangeSalary() {
                var chkChangeSalary = document.getElementById("<%=chkChangeSalary.ClientID %>");
                var div = document.getElementById("divLuong");

                if (chkChangeSalary.checked) {
                    div.style.display = "block";

                    var txtgrossold = $find("<%=txtGross.ClientID %>");
                    var txtbasicold = $find("<%=txtLuongcanban.ClientID %>");
                    var txtkpiold = $find("<%=txtKPI.ClientID %>");
                    var txtsubold = $find("<%=txtTrocaptonghop.ClientID %>");

                    var txtgross = $find("<%=txtGross_Now.ClientID %>");
                    var txtbasic = $find("<%=txtLuongcanban_Now.ClientID %>");
                    var txtkpi = $find("<%=txtKPI_Now.ClientID %>");
                    var txtsub = $find("<%=txtTrocaptonghop_Now.ClientID %>");

                    if (txtgross != null && txtbasic != null && txtkpi != null && txtsub != null) {
                        txtgross.set_value(txtgrossold.get_value());
                        txtbasic.set_value(txtbasicold.get_value());
                        txtkpi.set_value(txtkpiold.get_value());
                        txtsub.set_value(txtsubold.get_value());
                    }
                }
                else {
                    div.style.display = "none";
                }
            }

            function Cal_Salary(sender, event) {
                var txtGross = $find("<%=txtGross_Now.ClientID %>");
                var txtCanban = $find("<%= txtLuongcanban_Now.ClientID %>");
                var txtSusidies = $find("<% =txtTrocaptonghop_Now.ClientID  %>");
                var txtKPI = $find("<%= txtKPI_Now.ClientID %>");

                txtCanban.set_value(parseInt(txtGross.get_value() * 65 / 100));
            }

            function Cal_SalarySusidies(sender, event) {
                var txtGross = $find("<%=txtGross_Now.ClientID %>");
                var txtCanban = $find("<%= txtLuongcanban_Now.ClientID %>");
                var txtSusidies = $find("<% =txtTrocaptonghop_Now.ClientID  %>");
                var txtKPI = $find("<%= txtKPI_Now.ClientID %>");

                txtSusidies.set_value(txtGross.get_value() - txtCanban.get_value() - txtKPI.get_value());
            }

            var tooltip_orgchart = new SetToolTip("cboOrgChart", "rttOrgChart_input");
            var tooltip_prochart = new SetToolTip("cboProChart", "rttProChart_input");
            var tooltip_mgtchart = new SetToolTip("cboMgtChart", "rttMgtChart_input");
            var tooltip_jobrole = new SetToolTip("cboJobRole", "rttJobRole_input");

            function SetToolTip(senderid, tooltipid) {
                this.SetToolTip_OrChart = function (sender, args) {
                    var id = sender.get_id();
                    var rtt = $find(id.replace(senderid, tooltipid));

                    rtt.set_text(sender.get_text());
                }
            }

            function ClosePage() {
                var win = new WindowManager().GetRadWindow();
                win.close();
            }

            function LoadMaximize() {
                try {
                    var win = new WindowManager().GetRadWindow();
                    if (win != null) {
                        win.maximize();
                    }
                }
                catch (err) {
                }
            }


            //Hong add 06.02.2012

            //Check 65%Lương Gross<=Lương CB<=Lương Gross

            function txtLuongCB_CheckInput(source, args) {

                //Lấy giá trị tổng lương

                var txtGross_Now = $find("<%= txtGross_Now.ClientID %>");

                var valueTongLuong = txtGross_Now.get_value();

                //Lấy giá trị lương căn bản.

                var txtLuongcanban_Now = $find("<%= txtLuongcanban_Now.ClientID %>");

                var valueLuongCB = txtLuongcanban_Now.get_value();

                var Temp = 65 * valueTongLuong / 100;

                // alert(Temp);

                //Kiểm tra điều kiện lưong cb 65%gross<=Lương CB<=lương gross

                if (valueLuongCB < Temp || valueLuongCB > valueTongLuong) {

                    args.IsValid = false;

                    return false

                }

                else {

                    args.IsValid = true;

                    return true

                }

            }

            //End add

            // Check lương cơ bản > 0 và < Tổng lương

            function txtKPI_OnChecker(source, args) {

                //Lấy giá trị tổng lương

                var txtGross_Now = $find("<%=txtGross_Now.ClientID %>");

                var valueTongLuong = txtGross_Now.get_value();

                var txtKPI = $find("<%= txtKPI_Now.ClientID %>");

                var valueKPI = txtKPI.get_value();

                if (valueKPI < 0 || valueKPI > valueTongLuong) {

                    args.IsValid = false;

                    return false

                }

                else {

                    args.IsValid = true;

                    return true

                }

            }

            // Check luong tong hop > 0 và < Tổng lương

            function txtTroCapTH_OnChecker(source, args) {

                //Lấy giá trị tổng lương

                var txtGross_Now = $find("<%= txtGross_Now.ClientID %>");

                var valueTongLuong = txtGross_Now.get_value();

                var txtTroCapTH = $find("<%= txtTrocaptonghop_Now.ClientID %>");

                var valueTroCapTH = txtTroCapTH.get_value();

                if (valueTroCapTH < 0 || valueTroCapTH > valueTongLuong) {

                    args.IsValid = false;

                    return false

                }

                else {

                    args.IsValid = true;

                    return true

                }

            }


        </script>
    </telerik:RadCodeBlock>
</asp:Content>
